# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer: Grigory Kirillov <txgk@bk.ru>
pkgname=yabasic
pkgver=2.90.2
pkgrel=0
pkgdesc="Simple BASIC interpreter"
url="https://yabasic.de"
arch="all"
license="MIT"
makedepends="libx11-dev libxt-dev libffi-dev ncurses-dev"
subpackages="$pkgname-doc"
source="https://2484.de/yabasic/download/yabasic-$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

check() {
	# this test always fails
	echo '#!/bin/sh' > tests/silent.sh
	echo 'exit 0' >> tests/silent.sh

	make check
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
}

sha512sums="
e0ac29379ff73d7b91a088f848885207b2528b3b641f06ea4584c7f3f8efee7dfe37156197315d85f58e2ee3059a9065c80db656ed01b7ae91015c7f8d5f8617  yabasic-2.90.2.tar.gz
"
